﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace LB.Web
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_Ok_Click(object sender, EventArgs e)
        {
            ctlTip.Text = "";
            if (string.IsNullOrEmpty(ctlUsername.Text))
            {
                ctlTip.Text = "请输入用户名";
                return;
            }
            if (string.IsNullOrEmpty(ctlPassword.Text))
            {
                ctlTip.Text = "请输入密码";
                return;
            }
            string checkcode = Session["CheckCode"].ToString2();
            if (checkcode.ToLower() != ctlCheckCode.Text.ToLower())
            {
                ctlTip.Text = "验证码出错";
                return;
            }
            ctlTip.Text = "";
            Session.Clear();
            Response.Redirect("~/Admin/Main.aspx", true);
        }
    }
}